import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class TokenStorageService {
  protected key = 'bee_app_auth_token';

  constructor() { }

  clear(): void {
    sessionStorage.removeItem(this.key);
  }

  get(): string {
    return sessionStorage.getItem(this.key);
  }

  set(token: string): void {
    sessionStorage.setItem(this.key, token);
  }
}
